package sis.studentinfo;/*
 * @auther 顶风少年
 * @mail dfsn19970313@foxmail.com
 * @date 2019-07-20 08:37
 * @notify
 * @version 1.0
 */


import java.util.*;


public class CourseSession extends Session {
    //当前对象被创建了几次
    private static int count;

    //创建对象
    public static CourseSession create(Course course, Date startDate) {
        return new CourseSession(course, startDate);
    }
    //调用父类构造子
    protected CourseSession(Course course, Date startDate) {
        super(course, startDate);
        CourseSession.incrementCount();
    }
    //增加实例数
    public static  void incrementCount() {
        ++count;
    }
    //重置实例数
    public static void resetCount(){
        count=0;
    }
    //获取实例数
    public static int getCount(){
        return count;
    }

    //获取课程总共几周
    @Override
    protected int getSessionLength(){
        return 16;
    }
}
